package event;



import java.util.Enumeration;

import protocol.Node;

import network.Network;



public class EventGen {
	final int TIME=10000;
	public void autoGen(){
	Enumeration<Node> allnodes = Network.getInstance().getAllNodes();
	Node tempNode;
	while(allnodes.hasMoreElements()){
		tempNode = (Node) allnodes.nextElement();
		EventQueue.getInstance().add(new Event(Event.JOIN,TIME,tempNode,null,null));
	}
	EventQueue.getInstance().go();
	System.out.println("finish.");
}
}
